package com.training.biryani.nonveg;

import com.training.biryani.Biryani;
import com.training.biryani.BiryaniType;
import com.training.biryani.InvalidTypeException;
import com.training.biryani.Kitchen;

public class NonVegKitchen implements Kitchen {

	private static Kitchen nonVegKitchen = new NonVegKitchen();

	private NonVegKitchen(){
		//private constructor
	}



	@Override
	public  Biryani orderBiryani(BiryaniType type) throws InvalidTypeException {
		Biryani biryani = null;
		switch(type)
		{
		case Chicken:
			biryani = new ChickenDumBiryani();
			break;
		case Mutton:
			biryani = new MuttonDumBiryani();
			break;
		case Veg:
			throw new InvalidTypeException("This is Non veg Kitchen, No veg orders please");
		}
		return biryani;
	}



	/**
	 * Singleton pattern
	 * @return Kitchen instance (ofcourse nonveg kitchen :-) )
	 */
	public static Kitchen getKitchenInstance() {
		// TODO Auto-generated method stub
		return nonVegKitchen;
	}



	@Override
	public Biryani orderSimilarBiryani(Biryani biryani) {
		// TODO Auto-generated method stub
		return null;
	}

}
